import {Component} from 'angular2/core';
import {HomeComponent} from './components/home.component';
import {NavBar} from './components/nav-bar.component';
import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
import {ROUTER_PROVIDERS} from 'angular2/router';
import {Register} from './components/register.component';
import {HTTP_PROVIDERS} from 'angular2/http';
import {RegisterService} from './services/register.service';
import {Login} from './components/login.component';
import {LoginService} from './services/login.service';
import {UserService} from './services/user.service';
import {TaskService} from './services/task.service';
import {MyTaskInfo} from './components/my-task.component';
import {MySharedTask} from './components/my-sharedtask.component';
import {AddTaskInfoService} from './services/add-task.service';
import {AddTaskInfo} from './components/add-Task.component';
import {UpdateTaskInfo} from './components/update-Task.component';

@Component({
    selector: 'my-app',
    directives: [HomeComponent, NavBar, ROUTER_DIRECTIVES,Login, MyTaskInfo, AddTaskInfo,MySharedTask],
    providers: [ROUTER_PROVIDERS, HTTP_PROVIDERS, RegisterService, LoginService, UserService, ,TaskService],
    template: `
    <nav-bar></nav-bar>
    <router-outlet></router-outlet>
    `
})
@RouteConfig([
  {path:'/login', name:'Login', component: Login,useAsDefault: true},
  {path:'/home', name: 'Home', component: HomeComponent },
  {path: '/register', name:'Register', component: Register},
  {path:'/my-sharedtask', name:'MySharedTask', component: MySharedTask},
  {path:'/my-task', name:'MyTaskInfo', component: MyTaskInfo},
  {path:'/add-task', name:'AddTaskInfo', component: AddTaskInfo },
  {path:'/update-task', name:'UpdateTaskInfo', component: UpdateTaskInfo },
])
export class AppComponent { }
